Functions


Functions Summary
string

cot_checklistbox(mixed chosen, string name, array values, array titles, mixed attrs, string separator, bool addnull, string custom_rc)

Generates a checklistbox output

string

cot_filebox(string name, string value, string filepath, string delname, mixed attrs, string custom_rc)

Generates a form input file from a resource string

string

cot_inputbox(string type, string name, string value, mixed attrs, string custom_rc)

Generates a form input from a resource string

string

cot_radiobox(string chosen, string name, array values, array titles, mixed attrs, string separator, string custom_rc)

Generates a radio input group

string

cot_selectbox(mixed chosen, string name, array values, array titles, bool add_empty, mixed attrs, string custom_rc, bool htmlspecialchars_bypass)

Renders a dropdown

string

cot_selectbox_countries(string chosen, string name, bool add_empty, mixed attrs, string custom_rc)

Renders country dropdown

string

cot_selectbox_date(int utime, string mode, string name, int max_year, int min_year, bool usertimezone, string custom_rc)

Generates date part dropdown

string

cot_selectbox_lang(string chosen, string name, bool add_empty, mixed attrs, string custom_rc)

Returns language selection dropdown

string

cot_selectbox_structure(string extension, string check, string name, string subcat, bool hideprivate, bool is_module, bool add_empty, mixed attrs, string custom_rc)

Renders stucture dropdown

string

cot_selectbox_timezone(string chosen, string name, bool add_gmt, bool dst, mixed attrs, string custom_rc)

Returns timezone selection dropdown

string

cot_textarea(string name, string value, int rows, int cols, mixed attrs, string custom_rc)

Generates a textarea

Function Detail

system\forms.php at line 457

cot_checklistbox

public string cot_checklistbox(mixed chosen, string name, array values, array titles, mixed attrs, string separator, bool addnull, string custom_rc)
Generates a checklistbox output
Parameters:
chosen - Checkbox state
name - Input name
values - Options available
titles - Titles for options
attrs - Additional attributes as an associative array or a string
separator - Option separator, by default is taken from $R['input_radio_separator']
addnull - add nullvalue field for easycheck if chechlisybox is isset on the form
custom_rc - Custom resource string name
Returns:

system\forms.php at line 521

cot_filebox

public string cot_filebox(string name, string value, string filepath, string delname, mixed attrs, string custom_rc)
Generates a form input file from a resource string
Parameters:
name - Input name
value - Entered value
filepath - Entered filepath if defferent from value
delname - Delete file chechbox name
attrs - Additional attributes as an associative array or a string
custom_rc - Custom resource string name
Returns:

system\forms.php at line 57

cot_inputbox

public string cot_inputbox(string type, string name, string value, mixed attrs, string custom_rc)
Generates a form input from a resource string
Parameters:
type - Input type: text, checkbox, button, file, hidden, image, password, radio, reset, submit
name - Input name
value - Entered value
attrs - Additional attributes as an associative array or a string
custom_rc - Custom resource string name
Returns:

system\forms.php at line 89

cot_radiobox

public string cot_radiobox(string chosen, string name, array values, array titles, mixed attrs, string separator, string custom_rc)
Generates a radio input group
Parameters:
chosen - Seleced value
name - Input name
values - Options available
titles - Titles for options
attrs - Additional attributes as an associative array or a string
separator - Option separator, by default is taken from $R['input_radio_separator']
custom_rc - Custom resource string name
Returns:

system\forms.php at line 144

cot_selectbox

public string cot_selectbox(mixed chosen, string name, array values, array titles, bool add_empty, mixed attrs, string custom_rc, bool htmlspecialchars_bypass)
Renders a dropdown
Parameters:
chosen - Seleced value (or values array for mutli-select)
name - Dropdown name
values - Options available
titles - Titles for options
add_empty - Allow empty choice
attrs - Additional attributes as an associative array or a string
custom_rc - Custom resource string name
htmlspecialchars_bypass - Bypass htmlspecialchars() in values
Returns:

system\forms.php at line 210

cot_selectbox_countries

public string cot_selectbox_countries(string chosen, string name, bool add_empty, mixed attrs, string custom_rc)
Renders country dropdown
Parameters:
chosen - Seleced value
name - Dropdown name
add_empty - Add empty language option
attrs - Additional attributes as an associative array or a string
custom_rc - Custom resource string name
custom_rc - Custom resource string name
Returns:

system\forms.php at line 241

cot_selectbox_date

public string cot_selectbox_date(int utime, string mode, string name, int max_year, int min_year, bool usertimezone, string custom_rc)
Generates date part dropdown
Parameters:
utime - Selected timestamp
mode - Display mode: 'short' or complete
name - Variable name preffix
max_year - Max. year possible
min_year - Min. year possible
usertimezone - Use user timezone
custom_rc - Custom resource string name
Returns:

system\forms.php at line 323

cot_selectbox_lang

public string cot_selectbox_lang(string chosen, string name, bool add_empty, mixed attrs, string custom_rc)
Returns language selection dropdown
Parameters:
chosen - Seleced value
name - Dropdown name
add_empty - Add empty language option
attrs - Additional attributes as an associative array or a string
custom_rc - Custom resource string name
Returns:

system\forms.php at line 388

cot_selectbox_structure

public string cot_selectbox_structure(string extension, string check, string name, string subcat, bool hideprivate, bool is_module, bool add_empty, mixed attrs, string custom_rc)
Renders stucture dropdown
Parameters:
extension - Extension code
check - Seleced value
name - Dropdown name
subcat - Show only subcats of selected category
hideprivate - Hide private categories
is_module - TRUE for modules, FALSE for plugins
add_empty - Allow empty choice
attrs - Additional attributes as an associative array or a string
custom_rc - Custom resource string name
Returns:
Global:
CotDB $db

system\forms.php at line 362

cot_selectbox_timezone

public string cot_selectbox_timezone(string chosen, string name, bool add_gmt, bool dst, mixed attrs, string custom_rc)
Returns timezone selection dropdown
Parameters:
chosen - Seleced value, must be one of PHP supported timezone identifiers.
name - Form input name
add_gmt - Add GMT option at the top
dst - Show offsets including DST, if DST is currently in effect at the timezone.
attrs - Additional attributes as an associative array or a string
custom_rc - Custom resource string name
Returns:

system\forms.php at line 426

cot_textarea

public string cot_textarea(string name, string value, int rows, int cols, mixed attrs, string custom_rc)
Generates a textarea
Parameters:
name - Input name
value - Entered value
rows - Number of rows
cols - Number of columns
attrs - Additional attributes as an associative array or a string
custom_rc - Custom resource string name
Returns: